import Vue from 'vue'
import App from './App.vue'
import router from './router'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
// 导入全局样式
import './assets/css/index.css'
// 引入字体库
import './assets/fonts/iconfont.css'
import 'default-passive-events'
import TreeTable from 'vue-table-with-tree-grid'
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
import VueQuillEditor from 'vue-quill-editor'
Vue.use(VueQuillEditor)
Vue.use(ElementUI)

Vue.config.productionTip = false

Vue.component('tree-table', TreeTable)
Vue.filter('formatDate', function (times) {
  const dt = new Date(times * 1000)
  const y = dt.getFullYear().toString().padStart(2, '0')
  const m = (dt.getMonth() + 1).toString().padStart(2, '0')
  const d = dt.getDate().toString().padStart(2, '0')
  const h = dt.getHours().toString().padStart(2, '0')
  const mm = dt.getMinutes().toString().padStart(2, '0')
  const sec = dt.getSeconds().toString().padStart(2, '0')
  return y + '-' + m + '-' + d + ' ' + h + ':' + mm + ':' + sec
})
new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
